<h2>DESCRIPTION</h2>

<em>v.label</em> makes a label-file from a GRASS vector map
with labels created from attributes in the attached table.
If no label file name is given, the name of the source map is used.


<h2>NOTES</h2>

If the <em>fontsize</em> option is given then the <em>space</em> option
is determined automatically <em>from the current display window</em>, 
otherwise the <em>space</em> option should be set roughly the same
as the <em>size</em> option.
<p>
A description of the labels file follows.<p> 
The file is located in <tt>$MAPSET/paint/labels/</tt>.
The file is a plain-text ASCII file containing the following fields:

<h4>Caution: The following information may be incomplete, out of date, and wrong!</h4>
The label information that must be provided in the <em>labels</em> file is:

<dl>
<dt><b>TEXT</b>:

<dd><!--Up to four lines of text.-->
Lines in multiple line labels will appear one above the next.
More than one line of text can be specified by notating the end of a 
line with a '<b><tt>\n</tt></b>'.<br>
(e.g. <tt>SPEARFISH<b>\n</b>SOUTH DAKOTA)</tt>.

<!-- I don't think it exists. -HB 6/2005
<dt><b>SKIP</b>:

<dd>yes|no. If <em>no</em>, label will be printed.  If
<em>yes</em>, the label will be retained in the file but
not printed.
-->

<dt><b>LOCATION</b>:

<dd>Determines where the text will be located on the
image.  The user specifies the easting and northing, and
(optionally) specifies a vertical and horizontal 
offset from the specified easting/northing. 
These offsets are provided to allow finer placement of labels and
are measured in local pixels. Thus in 
<a href="d.labels.html"><i>d.labels</i></a> the offset is 
measured in screen pixels, and in <a href="ps.map.html"><i>ps.map</i></a> 
the offset is measured in PostScript points (i.e. 1/72" steps).


<dt><b>PLACEMENT</b>:

<dd>Determines which part of the label to which the
location refers.  If placement is unspecified, the label is
centered (<em>center</em>), by default.  Label placement
may be specified as:

<div class="code"><pre>
	lower left	(lower left corner of the text)
	lower right	(lower right corner of the text)
	lower center	(bottom center of the text)

	upper left	(upper left corner of the text)
	upper right	(upper right corner of the text)
	upper center	(top center of the text)

	center	(center of the text)

</pre></div>


<dt><b>FONT</b>:

<dd>This specifies the font to use.
<p>The following fonts are available for use with
  <a href="d.labels.html"><i>d.labels</i></a>:
<p>
<div class="code"><pre>
  cyrilc gothgbt gothgrt gothitt greekc greekcs greekp greeks
  italicc italiccs italict romanc romancs romand romans romant
  scriptc scripts
</pre></div>
<p>Alternatively the path to a FreeType (.ttf) font may be given.
(for <em>d.labels</em> only)
<p>The word <em>standard</em> can be used to specify the default font 
(which is <em>romans</em>).
<p>Note <a href="ps.map.html"><em>ps.map</em></a> can override this setting
to use other fonts. Its default font is Helvetica.


<dt><b>TEXT SIZE</b>:

<dd>This determines the size of the letters. The <em>size</em>
specifies the vertical height of the letters in meters on
the ground. Thus text will grow or shrink depending on the
scale at which the map is drawn.
Alternatively <em>fontsize</em> can set the font size in normal font points.


<dt><A NAME="textcolor"><b>TEXT COLOR</b></a>:

<dd>This selects the text color.  If unspecified, the
label's text is drawn in <em>black</em>, by default.  The
text color can be specified in one of several ways:

<ol>
<li>By color name:

<br>
<tt>aqua black blue brown cyan gray green grey indigo
magenta orange purple red violet white yellow</tt>

<li>As red, green, blue component values. (0-255)<br>
for example: <tt>128:100:200</tt>

<!-- eh?
<li>As red, green, blue percentages.
for example: .5 .4 .7
<br>
(This form is not supported by 
<em><a href="d.labels.html">d.labels</a></em>.)

<li>By printer color number to get the exact printer color.
<br>
(This form is not supported by 
<em><a href="d.labels.html">d.labels</a></em>.)
-->

<li>Specify "<tt>none</tt>" to suppress the lettering.
</ol>


<dt><b>WIDTH</b>:

<dd>This determines the line thickness of the border box.<br>
The maximum value is 25.0.

<dt><b>HIGHLIGHT COLOR</b>:

<dd>The text can be highlighted in another color so that it
appears to be in two colors. The text is drawn first in
this color at a wider line width, and then redrawn in the
text color at the regular line width.  No highlight color
("<tt>none</tt>") is used by default, if unspecified by the
user.  To specify use of no highlight color, specify
"<tt>none</tt>".
(See <a href="#textcolor">TEXT COLOR</a>
above for a list of permissible color names.)


<dt><b>HIGHLIGHT WIDTH</b>:

<dd>Specifies how far from the text lines (in units of
pixels) the highlight color should extend.  The default
highlight width is set to <em>0</em> (i.e., no highlight
color).


<dt><b>BACKGROUND COLOR</b>:

<dd>Text may be boxed in a solid color by specifying a background color.
Specify "<tt>none</tt>" for no background.  The default background color
setting, if unspecified by the user, is <em>white</em>.
(See <a href="#textcolor">TEXT COLOR</a>
above for a list of permissible color names.)


<dt><b>BORDER COLOR</b>:

<dd>Select a color for the border around the background.
Specify "<tt>none</tt>" to suppress the border.
The default border color used, if unspecified, is <em>black</em>.
(See <a href="#textcolor">TEXT COLOR</a>
above for a list of permissible color names.)


<dt><b>OPAQUE TO VECTORS</b>:

<dd><em>yes|no</em>.  This field only has meaning if a
background color is selected.  <em>yes</em> will prevent
vector lines from entering the background.  <em>no</em>
will allow vector lines to enter the background.  The
default setting, if unspecified by the user, is
<em>yes</em>.

</dl>

<h2>EXAMPLE</h2>

Spearfish example with TrueType font (path may differ):

<div class="code"><pre>
v.label -a map=roads column=label labels=lroads \
        font=/usr/X11R6/lib/X11/fonts/TTF/luximri.ttf
d.vect roads
d.labels lroads
</pre></div>

Since the label files are simple text files, you can merge them together
if you like. For example if you set the label colors based on database
attributes using multiple runs with the <b>where</b> option.
This example uses the standard UNIX <tt>cat</tt> program.

<div class="code"><pre>
cd $MAPSET/paint/labels/
cat file1 file2 file3 file4 > file_all
</pre></div>


<h2>SEE ALSO</h2>
<em>
<a href="d.labels.html">d.labels</a>,
<a href="ps.map.html">ps.map</a>
</em>


<h2>AUTHORS</h2>

Philip Verhagen (original s.label)<br>
Radim Blazek (GRASS 6 port)<br>
Hamish Bowman (enhancements)

<!--
<p>
<i>Last changed: $Date$</i>
-->
